#ifndef PSPROMPT_HPP
#define PSPROMPT_HPP

/*--------------------------------------------------------------------------*/
// PegScrollPrompt Bitmap Indexes
/*--------------------------------------------------------------------------*/
enum PSPM_BMPS {
    PBMI_NORM_BACK = 0, // Normal Backgroung bitmap
    PBMI_SEL_BACK,      // Has Focus bitmap
    PBMI_LEFT,          // Left bitmap
    PBMI_RIGHT          // Right bitmap
};


class PegScrollPrompt : public PegPrompt
{
    public:

        PegScrollPrompt(const PegRect &Rect,
                        PEGINT StringId = 0, PEGUSHORT Id = 0,
                        PEGULONG Style = FF_NONE|TJ_LEFT|
                                         AF_TRANSPARENT|SP_ALWAYS);

        PegScrollPrompt(const PEGCHAR *pText,
                        const PegRect &Rect,
                        PEGUSHORT Id = 0,
                        PEGULONG Style = FF_NONE|TJ_LEFT|
                                         AF_TRANSPARENT|SP_ALWAYS);

        virtual ~PegScrollPrompt();

        virtual void DataSet(PEGUINT StringId);
        virtual void DataSet(const PEGCHAR *pText);

        virtual void Draw(const PegRect &Invalid);
        virtual PEGINT Message(const PegMessage &Mesg);

        void SetAllBitmaps(PEGUINT NormalMap, PEGUINT SelectedMap,
                        PEGUINT LeftMap, PEGUINT RightMap);

        virtual void SetFont(PEGUINT Font);
        void SetBitmap(PEGINT Index, PEGUINT BitmapId);
        PEGINT GetBitmap(PEGINT Index) { return mBmpIds[Index]; }
        void SetScrollSpeed(PEGINT Amount, PEGINT Timeout);
        PEGINT GetTxJustOffSet(void) {return mTextJustOffSet;}
        void SetTxJustOffSet(PEGINT val) {mTextJustOffSet = val;}

    protected:
        void BeginScroll(void);
        void CreateTextBitmap(void);
        virtual PegRect GetTextRect(void);
        void ScrollText(void);

        PEGINT mBmpIds[4];
        PegBitmap *mpTextBitmap;        // bitmap for text drawing
        PegBitmap *mpSelTextBitmap;

        PEGINT mWrapSpace;
        PEGINT mCurrentOffset;
        PEGINT mTimeout;
        PEGINT mShiftAmount;
        PEGINT mTextJustOffSet;
};



#endif

